//
//  DietPlanHeaderView.m
//  KeepFit
//
//  Created by Fuzzie Liu on 15/11/5.
//  Copyright © 2015年 Fuzzie Liu. All rights reserved.
//

#import "DietPlanHeaderView.h"

@implementation DietPlanHeaderView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        self.addButton = [UIButton buttonWithType:UIButtonTypeSystem];
        [self addSubview:_addButton];
        [_addButton setTitle:@"添加+" forState:UIControlStateNormal];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat width = self.bounds.size.width;
    CGFloat height = self.bounds.size.height;
    self.addButton.frame = CGRectMake(width / 7 * 6, 0, width / 7, height);
}

@end
